//
//  ImageScrollView.h
//  AiQiChe
//
//  Created by lian jie on 7/31/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//


#import <UIKit/UIKit.h>
#import "ITSImageView.h"
#import "ITSGetImageOperation.h"

@protocol ImageZoomableViewDelegate;
@interface ImageZoomableView : UIScrollView <UIScrollViewDelegate> {
    ITSImageView *_imageView;
    int _index;
    BOOL _canClickScale;     //if the maxscale equals to minscale, the image can't support click enlarge
    id<ImageZoomableViewDelegate> _tapDelegate;
    
    NSOperationQueue *operationQueue;
}
@property (nonatomic, assign) int index;
@property (nonatomic, assign) id<ImageZoomableViewDelegate> tapDelegate;

- (UIImage *)image;
- (void)displayImage:(NSString*)imageUrl;

- (CGPoint)pointToCenterAfterRotation;
- (CGFloat)scaleToRestoreAfterRotation;
- (void)restoreCenterPoint:(CGPoint)oldCenter scale:(CGFloat)oldScale;
- (void)setMaxMinZoomScalesForCurrentBounds;
@end
@protocol ImageZoomableViewDelegate <NSObject>
@optional
- (void)imageZoomableViewSingleTapped:(ImageZoomableView*)imageZoomableView;

@end